import Vue from 'vue'
import Vuex from 'vuex'
// import Axios from 'axios'

Vue.use(Vuex)
const store = new Vuex.Store({
  state: {
    unreadNews: []
  },
  getters: {
    unreadNews: state => state.unreadNews
  },
  mutations: {
    addunreadNews (state, newData) {
      state.unreadNews.push(newData)
    },
    clearunreadNew (state) {
      state.unreadNews = []
      console.log('清除数据clearunreadNew' + state.unreadNews)
    }
  }
})
export default store
